package net.lzzy.practices.web.models;

import lombok.Getter;

/***
 * @author 1
 * 定义RESTful接口返回数据的格式
 */
@Getter
public class ApiResult {
    private final boolean success;
    private final String message;
    private  final Object data;

    public ApiResult(boolean success, String message, Object data) {
        this.success = success;
        this.message = message;
        this.data = data;
    }
    public boolean isSuccess() {
        return success;
    }

    public String getMessage() {
        return message;
    }

    public Object getData() {
        return data;
    }

}
